<script setup lang="ts">
import { twMerge } from "tailwind-merge";

defineProps<{
  italic?: boolean;

  lineClamp?: number;

  block?: boolean;
}>();
</script>

<template>
  <view
    :class="[
      twMerge(' max-w-full', $attrs.class as string || ''),
      {
        ellipsis: lineClamp ===1,
        'line-clamp': lineClamp && lineClamp > 1,
        italic,
        'inline-block': !block
      },
    ]"
    :style="[lineClamp && lineClamp > 1 && { '-webkit-line-clamp': lineClamp }]"
    ><slot />
  </view>
</template>
